
package main

import (
	"fmt"
	"time"
)

func main() {
	startedAt := time.Now()
	// 打印 0
	defer fmt.Println(time.Since(startedAt))

	time.Sleep(time.Second)

	defer func() {
		fmt.Println(time.Since(startedAt))
	}()
}
